{% load admin_static %}{% load staticfiles %}{% load firstof from future %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="shortcut icon" href="{% static 'hqz/images/favicon.ico' %}">

    <title>嗨圈子</title>

    <link rel="stylesheet" type="text/css" href="{% static 'hqz/css/bootstrap.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'hqz/css/carousel.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'hqz/css/signin.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'hqz/css/font-awesome.min.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'hqz/css/custom.css' %}"/>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="{% static 'hqz/js/html5shiv.js' %}"></script>
        <script src="{% static 'hqz/js/respond.min.js' %}"></script>
    <![endif]-->
</head>
{% load i18n %}

<body>
<div class="container">
    <div class="alert alert-success">用户：{{ object.nickname }} 注册成功</div>

    <form novalidate="novalidate" id="login-form" class="form-signin" role="form" method="post"
          action="{% url 'hqz:login' %}">
        {% csrf_token %}
        <h2 class="form-signin-heading">请登录</h2>
        <input type="text" name="username" class="form-control required email" placeholder="邮箱"
               value="{{ object.email }}" autofocus>
        <input type="password" name="password" class="form-control required" placeholder="密码"
               data-popover-position="right">
        <label class="checkbox">
            <input type="checkbox" value="remember-me">记住我
        </label>
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
        <input type="hidden" name="next" value="{% url 'hqz:main' %}"/>
    </form>

    <hr>

    <footer>
        <p>&copy; 微梦团队 2013</p>
    </footer>
</div>
<!-- /container -->


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="{% static 'hqz/js/jquery-1.10.2.min.js' %}"></script>
<script src="{% static 'hqz/js/bootstrap.min.js' %}"></script>
<script src="{% static 'hqz/js/gist-embed.js' %}"></script>
<script src="{% static 'hqz/js/jquery.validate.min.js' %}"></script>
<script src="{% static 'hqz/js/jquery.validate.bootstrap.popover.min.js' %}"></script>
<script src="{% static 'hqz/js/localization/messages_zh.js' %}"></script>
<script src="{% static 'hqz/js/additional-methods.js' %}"></script>
<script type="text/javascript">
    $(function () {
        $('#login-form').validate_popover({
            popoverPosition: 'right',
            rules: {
                password: {
                    required: true,
                    minlength: 6
                }
            },
            messages: {
                password: {
                    minlength: "密码必须至少为6个字符长"
                }
            }
        });
    });
</script>
</body>
</html>
